<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
   <%
   
   System.gc();
    Runtime rt = Runtime.getRuntime();
    float totalMemory = (float) rt.totalMemory() / 1048576.0F;
    float freeMemory = (float) rt.freeMemory() / 1048576.0F;
    float usedMemory = totalMemory - freeMemory;
    float percentUsed = usedMemory / totalMemory * 100.0F;
    
    /*System.out.print("Memory Stats,");
    System.out.print(new Date());
    System.out.print(",");
    System.out.print("totalMemory="+totalMemory);
    System.out.print(",");
    System.out.print("usedMemory="+usedMemory);
    System.out.print(",");
    System.out.println(percentUsed);*/
    
    System.out.println("@@@@@@@@@@@@totalMemory="+totalMemory+"    usedMemory="+usedMemory+"   percentUsed="+percentUsed);
    %>

  </head>
  
  <body>
    This is my JSP page. <br>
  </body>
</html>
